package cn.itcast.bos.service.take_delivery;

import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.query.Procedure;

import cn.itcast.bos.domain.page.PageBean;
import cn.itcast.bos.domain.take_delivery.Promotion;

public interface PromotionService {
	
	void save(Promotion model);

	Page<Promotion> findAll(Pageable pageable);
	
	//对外提供服务   :查询促销活动分页数据的服务接口
	//http://localhost:9001/bos_management/services/promotionService/pageQuery?page=1&rows=10
	@Path("/pageQuery")
	@GET
	@Consumes({"application/xml","application/json"})
	@Produces({"application/xml","application/json"})
	PageBean<Promotion> findPageData(@QueryParam("page") int page,@QueryParam("rows") int rows);
}










